﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using idn.thanhconggroup.biz.Models;
using idn.thanhconggroup.biz.Services;
using idn.thanhconggroup.web.Filters;


namespace idn.thanhconggroup.web.Controllers
{
    public class CompanyController : FrontControllerBase
    {
        //
        // GET: /CompanyCate/

        public ActionResult Index()
        {
            var listcompanycate = ServiceFactory.CompanyCateManager.GetAllActive(Culture);
            ViewData["ListCompanyCate"] = listcompanycate;
            return View();
        }
        public ActionResult Company(string shortname, int id)
        {
            var company = ServiceFactory.CompanyManager.Get(new Company { CompanyId = id });
            var listnews = ServiceFactory.NewsManager.GetTopHotByTag(2, id, Culture);
            ViewData["ListNews"] = listnews;
            var listlibrary = ServiceFactory.LibraryManager.GetTopHotByTag(2, id, Culture);
            ViewData["ListLibrary"] = listlibrary;
            ViewBag.PageTitle = company.CompanyName+" - Thành Công Group";
            return View(company);
        }

    }
}
